package com.vcredit.creditcat.manager;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.dubbo.config.annotation.Service;
import com.vcredit.creditcat.api.ICustAccountManage;
import com.vcredit.creditcat.model.CustAccount;
import com.vcredit.creditcat.service.CustAccountService;

@Service(protocol = { "protocol1" }, version = "1.0")
public class CustAccountManager implements ICustAccountManage {

	@Autowired
	private CustAccountService custAccountService;

	@Override
	public CustAccount findById(Long custId) {
		// TODO Auto-generated method stub
		CustAccount custAccount = new CustAccount();
		custAccount.setCustId(custId);
		List<CustAccount> list = custAccountService.find(custAccount);
		if (null == list || list.size() == 0) {

		} else {
			custAccount = custAccountService.find(custAccount).get(0);
		}
		return custAccount;
	}

}
